//
//  SchoolView.m
//  Civacrm
//
//  Created by 王桂敏 on 2017/2/9.
//  Copyright © 2017年 王桂敏. All rights reserved.
//

#import "SchoolView.h"


@implementation SchoolView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self initView];
    }
    return self;
}

- (void)initView{
    self.backgroundColor = WhiteColor;
    self.iconView = [UIImageView imageViewWithFrame:CGRectMake(w(21), 0, w(37), h(30)) image:@"icon_wodejigou"];
    self.iconView.centerY = self.height / 2;
    [self addSubview:self.iconView];
    
    self.titleLabel = [UILabel labelWithTitle:@"学校名称" frame:CGRectMake(getMaxX(self.iconView) + w(21), 0, w(120), self.height) font:font(32) textColor:ColorWithHexString(@"4e778f") bgColor:ClearColor];
    [self addSubview:self.titleLabel];
    
    self.nameLabel = [UILabel labelWithTitle:nil frame:CGRectMake(getMaxX(self.titleLabel) + w(22), 0, kScreenWidth - w(22) -  getMaxX(self.titleLabel) - w(22), self.height) font:font(28) textColor:ColorWithHexString(@"a0c0d2") bgColor:ClearColor];
    self.nameLabel.textAlignment = NSTextAlignmentRight;
    [self addSubview:self.nameLabel];
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
